//
//  main.m
//  延展作业
//
//  Created by dllo on 16/7/13.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "NSMutableArray+Convert.h"
#import "Person.h"
#import "Truck.h"
#import "Student.h"
int main(int argc, const char * argv[]) {
    
//    1.iOS9新特性三块的深入理解, 创建几个类, 熟悉写法(提交练习成果)
//    2.iOS 类扩展方式的复习 1> 给NSMutableArray添加convert方法，实现数组倒序。
//    3.预习UI内容
    
    
    
    
    
//    1.
#if 0

    Person *per = [[Person alloc] init];
    per.name = nil;
    [per setName:nil];
    per.name = @"jdfk";
  
    NSMutableArray<NSString *> *array = [NSMutableArray arrayWithObjects:@"gh",@"df", nil];
    NSString *string = array.lastObject;
    array.firstObject.length;
    [array addObject:@20];
    [array addObject:per];
    NSInteger integer = [array objectAtIndex:0].length;
    
    NSMutableDictionary<NSString *,NSString *> *dic = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"君宝",@"name", nil];
    [dic objectForKey:@"name"].length;
    
    Truck<Student *> *truckStu = [[Truck alloc] init];
    [truckStu addObject:per];
    Truck<Person *> *truckPer = [[Truck alloc] init];
    Student *stu = [[Student alloc] init];
    stu.stuNumber = @"998";
    
    [truckStu addObject:stu];
    [truckPer addObject:per];
    
    Truck *truck = nil;
    Truck<NSArray *> *truck1 = nil;
    Truck<NSMutableArray *> *truck2 = nil;
    
    
    Truck *truckKindOf = [[Truck alloc] init];
    NSMutableArray *arr = (NSMutableArray *)[truckKindOf returnArray];
    NSArray *arr1 = [truckKindOf returnArray];
    NSMutableArray *arr2 = (NSMutableArray *)arr1;
#endif
    
//    2.
#if 0

    NSMutableArray *arr = [NSMutableArray arrayWithObjects:@"1",@"2",@"3",@"4", nil];
    NSMutableArray *arr2 = [arr convert];
    
    NSLog(@"%@",arr2);
#endif
    
    
    
    
    
    return 0;
}
